Tags: Google CDN front-end plug-in
Chrome Web store installation address:Https://chrome.google.com/webstore/detail/replace-google-cdn/kpampjmfiopfpkkepbllemkibefkiice
As we all know, you only need to replace a domain name to continue using the front-end public library provided by
CDN stands for Content Delivery Network (CDN. The purpose is to add a new network architecture to the existing Internet to publish website content to the "edge" closest to the user's network ", this allows users to obtain the desired content from the nearest node to solve the problem of Internet congestion and improve the response speed of users accessing the website. Technically, it solves the slow respons
Chrome Web Store Installation Address:Https://chrome.google.com/webstore/detail/replace-google-cdn/kpampjmfiopfpkkepbllemkibefkiice
For well-known reasons, simply replacing a domain name will allow you to continue using the front-end public libraries provided by Google. The same, use the script tag to refer to these resources, so that the site access to
Since jQuery 1.3, I have not provided the pack version, and I am in favor of using Google CDN for code hosting.
This solution has the following benefits:
1. Smaller downloads.
We all know that there are as many as 38 kb after jQuery 1.3 pack. If you can delete the copyright annotation to get a smaller code, unfortunately this is not only shameless but only saves 1 kb. However, the Min version that uses GZip
Previously, jquery script library was introduced in the website as follows:
Sometimes we need to introduce other large script class libraries, such as prototype. Every time we introduce them, we have to consider how depressing customers are when they open the web page.
Now, Google and Microsoft provide CDN services for libraries such as jquery, prototype, and mootools. In this way, users can access these s
details, it's recommended to load Google jquery. Speaking of some of the students here will ask why the bias to load Google jquery library it? Let me talk to you about the benefits of using Google to load jquery library files.
Maybe loading jquery from Google is not necessarily faster than your site. But when
way, we load the JS library of jquery 1.3.2 from Google's latest CDN image, and then we can write the JS Code normally. However, even Google's CDN images take time to download. What if the browser has explained the following code before the code library is downloaded? We can set to execute JS after loading the JS Library:Google. setonloadcallback (function () {// code to be executed });For more information
this:Google.load ("jquery", "1.3.2");
In this way we will be from Google's recent CDN image loaded with the jquery 1.3.2 version of the JS library, then you can write the normal JS code. However, even Google's CDN image, download is after all, it takes time, in case the code base has not been downloaded and the browser has explained the following code how to do. We can set the JS library after loading to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.